#! /usr/bin/env node 
const fs = require("fs");
const http = require("http")
const version = JSON.parse(fs.readFileSync("./package.json","utf-8"));
console.log(fs.readdirSync(process.cwd()));
const ver = process.argv[2];
const { program } = require('commander');
program.version('0.0.1');
if(ver==="-v"||ver==="-version"){
    console.log(version.version);
}
program
  .option('-p, --pizza <type>', 'flavour of pizza');

program.parse(process.argv);

const options = program.opts();
const sten = options.pizza||8080
http.createServer((req,res)=>{
    res.end("666")
}).listen(sten)
